<?php
require 'db.php';
require 'function.php';

$id = $_GET['id'];
$category = new Manager($link);
$query = $category->deleteCategory($id);
if ($query){
    header("Location:m_category.php");
}else{
    echo "<script>alert('删除失败！');</script>";
    echo "<script>history.go(-1);</script>";
    exit();
}




?>